import request from '@/utils/request'

// 查询出库信息列表
export function outStorageList(query) {
  return request({
    url: '/outStorage/queryPageList',
    method: 'get',
    params: query
  })
}

//获取出库信息详细信息
export function outStorageDetails(outStorageId) {
  return request({
    url: `/outStorage/${outStorageId}`,
    method: 'get'
  })
}


// 车库出库
export function insertCarOutStorage(data) {
  return request({
    url: '/outStorage/insertCarOutStorage',
    method: 'post',
    data: data
  })
}

// 车库出库-提交
export function submitOutStorage(data) {
  return request({
    url: '/outStorage/submit',
    method: 'post',
    data: data
  })
}

// 修改车库出库
export function updateCarOutStorage(data) {
  return request({
    url: '/outStorage/updateCarOutStorage',
    method: 'post',
    data: data
  })
}

// 删除车库出库
export function deleteOutStorage(ids) {
  return request({
    url: `/outStorage/${ids}`,
    method: 'post'
  })
}

//获取子订单信息详细信息
export function outOrderDetails(outStorageId) {
  return request({
    url: `/order/orderCar/orderCarParam/${outStorageId}`,
    method: 'get'
  })
}

//获取出库替车详细信息
export function replacementCarOutStorage(orderCarId) {
  return request({
    url: `/replacementCar/replacementCarOutStorage/${orderCarId}`,
    method: 'get'
  })
}

//提交替车出库单
export function replacementCarOutStorageSave(query) {
  return request({
    url: `/replacementCar/submit/replacementCarOutStorage`,
    method: 'post',
    data: query
  })
}

